package com.aiyan.edu.service.user.center.controller;

import com.aiyan.edu.api.user.UserControllerApi;
import com.aiyan.edu.framework.domain.ucenter.ext.UserExt;
import com.aiyan.edu.framework.model.response.CommonResponseResult;
import com.aiyan.edu.framework.web.BaseController;
import com.aiyan.edu.service.user.center.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zqzhou
 * @create: 2019/11/21 23:56
 **/
@RestController
@RequestMapping("/ucenter")
public class UserController extends BaseController implements UserControllerApi {

    @Autowired
    UserService userService;

    @Override
    @GetMapping("/userext/{username}")
    public CommonResponseResult<UserExt> getUserExt(@PathVariable("username") String username) {
        return this.userService.getUserExt(username);
    }
}
